package kadledav.adventure.framework.controll.commands;

import java.io.PrintStream;
import java.util.Scanner;

import kadledav.adventure.framework.controll.ControllConstants;
import kadledav.adventure.framework.controll.commands.abstr.PrintDescriptionCommnad;
import kadledav.adventure.framework.model.world.Player;

public class ShowInventoryCommand extends PrintDescriptionCommnad {

	public ShowInventoryCommand(PrintStream out, Scanner in, Player player) {
		super(out, in, player);
	}

	@Override
	public void execute(String[] userCommand) {	
		boolean wasPrint = printDescribableObject(player.getInventoryItems(), ControllConstants.INVENTORY_ITEM_PREFIX, "Polozky v inventari:");
		if(!wasPrint){
			out.println("Inventrar je prazdny.");
		}
		out.println();
	}
}
